package com.mcxx.modules.miniSalvation.order.dao.read;

import com.mcxx.modules.miniSalvation.check.dto.CheckFileDTO;
import com.mcxx.modules.miniSalvation.order.dto.NoticeBoardDTO;
import com.mcxx.modules.miniSalvation.order.dto.OrderCertDTO;
import com.mcxx.modules.miniSalvation.order.entity.OrderCertEntity;
import com.mcxx.modules.miniSalvation.order.param.ReferenceParam;
import com.mcxx.modules.temporary.order.entity.TmpOrderCertEntity;
import com.yinhai.ta404.module.mybatis.mapper.Ta404SupportMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderCertReadDao extends Ta404SupportMapper {



	
	List<String> getNoExistCertIdcard(String fileType, String associationTable, List<String> orderIdList);

	
    List<Map<String, Object>> countByTypes(ReferenceParam countParam);

	
	List<Map<String, String>> listByType(ReferenceParam referenceParam);

	
    String getFileKeyById(String id);

	
    List<String> listFileKeyByIds(String[] ids);

	
	List<NoticeBoardDTO> cntNoticesCertNum(List<String> batchNoList);

	
    Integer getUserLevelById(String id);

	
	OrderCertDTO getFileKeyAndUserLevelById(String id);

	
	List<CheckFileDTO> getFileByMemberId(@Param("memberId") String memberId,@Param("orderId")String orderId);
	
	List<CheckFileDTO> getAuthorFile(String fileType,String orderId);
	
	List<CheckFileDTO> getFileBySupportId(String type,String fileType,String orderId,String tableId);


	
	List<NoticeBoardDTO> cntNoticeIdCertNum(String batchId);

	
	Map<String, Long> cntFamilyCertNum(@Param("orderId") String orderId, @Param("familyId") String familyId);

	
	int cntInhouseCertNum(@Param("orderId") String orderId,  @Param("orderInhouseId") String orderInhouseId);

	
	List<String> cntMemberIdcardNum(@Param("orderId") String orderId, @Param("familyId")String familyId);
	
	List<String> cntSupportIdCardNum(@Param("orderId") String orderId,@Param("familyId") String familyId);
	
	List<String> cntSupportCertBeforeCheck(@Param("orderIds") List<String> orderIds);

	
	int queryCertIsExiten(@Param("orderIdList") List<String> orderIdList,String fileType,String associationTable);

	
	List<String> getSQSNumByOrderIds(List<String> orderIdList);
	
	List<String> selectFamilyMustCert(List<String> orderIdList);

	
	List<String> getOrderIdNoIdcardCert(List<String> list);
	
    int	selectSupportAuthor(@Param("familyId") String familyId,@Param("orderId") String orderId);
	
	int	selectSupportInfo(@Param("familyId") String familyId);

	
    List<String> selectSupportAuthorList(List<String> orderIdList);

	
	int cntCaregiverCertNum(@Param("orderId") String orderId,@Param("caregiverId")String caregiverId);

	
	int cntBankCertNum(@Param("memberId") String memberId,@Param("orderId")String orderId);
	
	int cntBankTempCertNum(@Param("memberId") String memberId,@Param("orderId")String orderId);
	
	int cntCertNum(@Param("memberId") String memberId,@Param("orderId")String orderId,@Param("fileType") String fileType,@Param("accTable")String accTable);
	
	int cntCertNumTmp(@Param("memberId") String memberId,@Param("orderId")String orderId,@Param("fileType") String fileType,@Param("accTable")String accTable);

	List<OrderCertEntity>  selectBySelective(OrderCertEntity orderCertEntity);
	
	List<String> getIntegrateAuthorFile(String fileType,String orderId);
	
	List<String> selectOrderNoAuthorFile(List<String> list);
	
	List<String> getHistoryOrderIdNoIdcardCert(List<String> list);

	List<OrderCertEntity> selectDatumByOrderIdAndFileType(String orderId, String fileType, Integer associationTable);
	
	List<String> selectDepartmentMustCert(List<String> list);
}
